// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, deleteRequest, importRequest, getRequestWithNoToken } from '@/libs/axios';

// 获取IP数据 多条件
export const getIpList = (params) => {
    return getRequest('/ip/getByCondition', params)
}
// 根据IP名称搜索IP
export const searchIp = (params) => {
    return getRequest('/ip/search', params)
}
// 添加IP
export const addIp = (params) => {
    return postRequest('/ip/add', params)
}
// 编辑IP
export const editIp = (params) => {
    return postRequest('/ip/edit', params)
}
// 删除IP
export const deleteIp = (ids, params) => {
    return deleteRequest(`/ip/delByIds/${ids}`, params)
}
// 设置热门IP
export const hotIp = (ids, params) => {
    return postRequest(`/ip/hot/${ids}`, params)
}
// 取消热门IP
export const unhotIp = (ids, params) => {
    return postRequest(`/ip/unhot/${ids}`, params)
}
//根据id获取IP
export const getIpById = (id, params) => {
    return getRequest(`/ip/get/${id}`, params)
}

// 获取IP数据 待审核
export const getIpWaitList = (params) => {
    return getRequest('/ip/getWaitList', params)
}
// 审批IP
export const auditIp = (ids, params) => {
    return postRequest(`/ip/auditByIds/${ids}`, params)
}

// 推荐
export const recommendIp = (ids, params) => {
    return postRequest(`/ip/recommend/${ids}`, params)
}
// 取消推荐
export const unRecommendIp = (ids, params) => {
    return postRequest(`/ip/unRecommend/${ids}`, params)
}